# frozen_string_literal: true

class VMBinding
  def initialize(observable)
    @observable = observable
  end

  def value=(value)
    @observable.set(value)
  end

  def value
    return @observable.get
  end
end

class AttributeVMBinding < VMBinding
  def initialize(observable, name)
    @observable = observable
    @name = name
  end

  def value=(value)
    @observable[@name] = value
  end

  def value
    return @observable[@name]
  end
end
